#include "sdkGlobal.h"
#include "platform_global.h"
#include "platform_qrcode_refund.h"

typedef struct
{
    TransmitQrcodeRefundFunc mTransmitQrcodeRefundFunc;
    TransmitQrcodeRefundQueryFunc mTransmitQrcodeRefundQueryFunc;
    TransShowPlatformFunc mTransShowFunc;
    RecordPlatformFunc mRecordPlatformFunc;
    TransmitDataPlatformFunc mTransmitDataPlatformFunc;
    InputAdminPasswordFunc mInputAdminPasswordFunc;
    InputSysRefNoFunc mInputSysRefNoFunc;
    InputOriginalTradeDateFunc mInputOriginalTradeDateFunc;
    QrcodeRefundStatusFunc mQrcodeRefundStatusFunc;
    IsQrcodePayingFunc mIsQrcodePayingFunc;
} platform_qrcode_refund_entity;

static platform_qrcode_refund_entity g_platform_qrcode_refund_entity;

void platform_qrcode_refund_init()
{
    memset(&g_platform_qrcode_refund_entity, 0x00, sizeof(platform_qrcode_refund_entity));
}

void platform_qrcode_refund_set_transmit_refund_func(TransmitQrcodeRefundFunc func)
{
    g_platform_qrcode_refund_entity.mTransmitQrcodeRefundFunc = func;
}

TransmitQrcodeRefundFunc platform_qrcode_refund_get_transmit_refund_func()
{
    return g_platform_qrcode_refund_entity.mTransmitQrcodeRefundFunc;
}

void platform_qrcode_refund_set_transmit_query_func(TransmitQrcodeRefundQueryFunc func)
{
    g_platform_qrcode_refund_entity.mTransmitQrcodeRefundQueryFunc = func;
}

TransmitQrcodeRefundQueryFunc platform_qrcode_refund_get_transmit_query_func()
{
    return g_platform_qrcode_refund_entity.mTransmitQrcodeRefundQueryFunc;
}

void platform_qrcode_refund_set_show_func(TransShowPlatformFunc *flowFunc)
{
    memcpy(&g_platform_qrcode_refund_entity.mTransShowFunc, flowFunc, sizeof(TransShowPlatformFunc));
}

TransShowPlatformFunc *platform_qrcode_refund_get_show_func()
{
    return &g_platform_qrcode_refund_entity.mTransShowFunc;
}

void platform_qrcode_refund_set_transmit_data_func(TransmitDataPlatformFunc *platformFunc)
{
    memcpy(&g_platform_qrcode_refund_entity.mTransmitDataPlatformFunc, platformFunc, sizeof(TransmitDataPlatformFunc));
}

TransmitDataPlatformFunc *platform_qrcode_refund_get_transmit_data_func()
{
    return &g_platform_qrcode_refund_entity.mTransmitDataPlatformFunc;
}

void platform_qrcode_refund_set_record_func(RecordPlatformFunc *platformFunc)
{
    memcpy(&g_platform_qrcode_refund_entity.mRecordPlatformFunc, platformFunc, sizeof(RecordPlatformFunc));
}

RecordPlatformFunc *platform_qrcode_refund_get_record_func()
{
    return &g_platform_qrcode_refund_entity.mRecordPlatformFunc;
}

void platform_qrcode_refund_set_input_admin_password_flow_func(InputAdminPasswordFunc platformFunc)
{
    g_platform_qrcode_refund_entity.mInputAdminPasswordFunc = platformFunc;
}

InputAdminPasswordFunc platform_qrcode_refund_get_input_admin_password_flow_func()
{
    return g_platform_qrcode_refund_entity.mInputAdminPasswordFunc;
}

void platform_qrcode_refund_set_input_sysrefno_flow_func(InputSysRefNoFunc platformFunc)
{
    g_platform_qrcode_refund_entity.mInputSysRefNoFunc = platformFunc;
}


InputSysRefNoFunc platform_qrcode_refund_get_input_sysrefno_flow_func()
{
    return g_platform_qrcode_refund_entity.mInputSysRefNoFunc;
}

void platform_qrcode_refund_set_input_original_trade_date_flow_func(InputOriginalTradeDateFunc platformFunc)
{
    g_platform_qrcode_refund_entity.mInputOriginalTradeDateFunc = platformFunc;
}


InputOriginalTradeDateFunc platform_qrcode_refund_get_input_original_trade_date_flow_func()
{
    return g_platform_qrcode_refund_entity.mInputOriginalTradeDateFunc;
}

void platform_qrcode_refund_set_pay_status_func(QrcodeRefundStatusFunc func)
{
    g_platform_qrcode_refund_entity.mQrcodeRefundStatusFunc = func;
}

QrcodeRefundStatusFunc platform_qrcode_refund_get_pay_status_func()
{
    return g_platform_qrcode_refund_entity.mQrcodeRefundStatusFunc;
}

void platform_qrcode_refund_set_is_qrcode_paying_func(IsQrcodePayingFunc func)
{
    g_platform_qrcode_refund_entity.mIsQrcodePayingFunc = func;
}

IsQrcodePayingFunc platform_qrcode_refund_get_is_qrcode_paying_func()
{
    return g_platform_qrcode_refund_entity.mIsQrcodePayingFunc;
}

